<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>窗口通信Page1</title>
<script type="text/javascript">
function SaveStorage(frm){
	// 保存数据到localStorage
	window.localStorage.name=document.getElementById("name").value;
}
</script>
</head>
<body>
姓名<input type="text" name="name" id="name" />
<input type="button" value="保存" onclick="SaveStorage(this.form)" />
</body>
</html>